<!-- FB like button -->
<div id="fb-root"></div>
<script>
            (function(d, s, id) {
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id))
                    return;
                js = d.createElement(s);
                js.id = id;
                js.src = "//connect.facebook.net/ru_RU/all.js#xfbml=1";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));
</script>
<!-- FB like button -->

<!-- VK like button -->
<script type="text/javascript" src="//vk.com/js/api/openapi.js?79"></script>

<script type="text/javascript">
    VK.init({apiId: 3450051, onlyWidgets: true});
</script>
<!-- VK like button -->

<div class="post-title">
    <h2 class="align-center"><?= $this->post['title'] ?></h2>
</div>

<div class="post-info">
    <em><?= $this->__('Published by'); ?>: <a href="/profile/<?= $this->post['user']; ?>"><?= $this->post['user'] ?></a> <?= $this->post['date'] ?></em>
    <em><?= $this->__('Category'); ?>: <a href="/category/<?= $this->post['category_en'] ?>"><?= $this->post['category'] ?></a></em>
    <?php if (count($this->post['tags']) > 0): ?>
        <em><?= $this->__('Tags'); ?>:
            <?php foreach ($this->post['tags'] as $tag): ?>
                <a href="/tag/<?= $tag['tag']; ?>"><?= $tag['tag']; ?></a>  
            <? endforeach; ?>
        </em>
    <?php endif; ?>
</div>

<div class="post-tools">
    <em class="fb-like" data-href="http://shagtv.me/post/<?= $this->post['id'] ?>" data-send="false" data-layout="button_count" data-width="850" data-show-faces="false" data-font="arial"></em>
    <em id="vk_like"></em>
    <script type="text/javascript">
        VK.Widgets.Like("vk_like", {type: "mini", verb: 1, height: 24});
    </script>
    <em class="icons-views" title="<?= $this->__('Views') . ': ' . $this->post['views']; ?>"></em><em class="em-views"><?= $this->post['views'] ?></em>
    <?php if ($this->showInfo): ?>
        <a href="/post/edit/<?= $this->post['id']; ?>"><em class="icons-edit" title="<?= $this->__('Edit'); ?>"></em></a>
        <a onclick="return confirm('Вы действительно хотите удалить статью?')" href="/post/delete/<?= $this->post['id']; ?>"><em class="icons-delete" title="<?= $this->__('Delete'); ?>"></em></a>
    <?php endif; ?>
</div>    

<div id="post" class="post-text">
    <?= stripslashes($this->post['post']) ?>
</div>